﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SJ.Platform.Extend.Response
{
    /// <summary>
    /// 登录接口响应结果
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ApiLoginResponse<T> : ApiResponse
    {
        public string Token { get; set; } = null!;
        public T Data { get; set; } = default!;

        public static ApiLoginResponse<T> SetResponse(ApiResponseStatus status, string message, string token, T data)
        {
            return new ApiLoginResponse<T>
            {
                Code = ((int)status).ToString(),
                Message = message,
                Token = token,
                Data = data
            };
        }
    }
}